<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--suppress ALL-->
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <base th:href="@{/}"><!-- 不用base就使用th:src="@{/js/jquery.min.js} -->
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>天天生鲜-用户中心</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <script type="text/javascript" src="/js/jquery-1.12.4.min.js"></script>
    <script src="/layui/layui.js"></script>
    <style>
        .btnTest {
            background: #eeeeee;
            background-image: -webkit-linear-gradient(top, #eeeeee, #6aa84f);
            background-image: -moz-linear-gradient(top, #eeeeee, #6aa84f);
            background-image: -ms-linear-gradient(top, #eeeeee, #6aa84f);
            background-image: -o-linear-gradient(top, #eeeeee, #6aa84f);
            background-image: linear-gradient(to bottom, #eeeeee, #6aa84f);
            -webkit-border-radius: 58;
            -moz-border-radius: 58;
            border-radius: 58px;
            font-family: Arial;
            color: black;
            font-size: 2px;
            padding: 5px 10px 5px 10px;
            text-decoration: none;
        }
        .btnTest:hover {
            background: #6aa84f;
            background-image: -webkit-linear-gradient(top, #6aa84f, #eeeeee);
            background-image: -moz-linear-gradient(top, #6aa84f, #eeeeee);
            background-image: -ms-linear-gradient(top, #6aa84f, #eeeeee);
            background-image: -o-linear-gradient(top, #6aa84f, #eeeeee);
            background-image: linear-gradient(to bottom, #6aa84f, #eeeeee);
            text-decoration: none;
        }
        .bbbb {
            background: #8fce00;
            background-image: -webkit-linear-gradient(top, #8fce00, #274e13);
            background-image: -moz-linear-gradient(top, #8fce00, #274e13);
            background-image: -ms-linear-gradient(top, #8fce00, #274e13);
            background-image: -o-linear-gradient(top, #8fce00, #274e13);
            background-image: linear-gradient(to bottom, #8fce00, #274e13);
            -webkit-border-radius: 7;
            -moz-border-radius: 7;
            border-radius: 7px;
            font-family: Arial;
            color: white;
            font-size: 2px;
            padding: 5px 10px 5px 10px;
            text-decoration: none;
        }

        .bbbb:hover {
            background: #274e13;
            background-image: -webkit-linear-gradient(top, #274e13, #8fce00);
            background-image: -moz-linear-gradient(top, #274e13, #8fce00);
            background-image: -ms-linear-gradient(top, #274e13, #8fce00);
            background-image: -o-linear-gradient(top, #274e13, #8fce00);
            background-image: linear-gradient(to bottom, #274e13, #8fce00);
            text-decoration: none;
        }
    </style>

</head>
<body>
<div class="header_con">
    <div class="header">
        <div class="welcome fl">欢迎来到天天生鲜!</div>
        <div class="fr">
            <div class="login_info fl">
                欢迎您：<em>张 山</em>
            </div>
            <div class="login_btn fl">
                <a href="/index">首页</a>
                <a href="/toLogin" th:if="${session.user==null}">登录</a>
                <span th:if="${session.user!=null}" th:text="'欢迎：'+${session.user.userEmail}" style="color: black"></span>
                <span>|</span>
                <a href="/toRegister">注册</a>
            </div>
            <div class="user_link fl">
                <span>|</span>
                <a href="/toUserCenterInfo">用户中心</a>
                <span>|</span>
                <a href="/carttable/myCart">我的购物车</a>
                <span>|</span>
                <a href="/focustable/myFocus">我的收藏</a>
                <span>|</span>
                <a href="/toUserCenterOrder?currentPage=1&pageSize=4">我的订单</a>
            </div>
        </div>
    </div>
</div>

<div class="search_bar clearfix">
    <a href="index.html" class="logo fl"><img src="images/logo.png"></a>
    <div class="sub_page_name fl">|&nbsp;&nbsp;&nbsp;&nbsp;用户中心</div>
    <div class="search_con fr">
        <form action="/goodstable/searchForGoods">
            <input type="text" class="input_text fl" name="goodsName" placeholder="搜索商品">
            <input type="submit" class="input_btn fr" name="" value="搜索">
        </form>
    </div>
</div>

<div class="main_con clearfix">
    <div class="left_menu_con clearfix">
        <h3>用户中心</h3>
        <ul>
            <li><a href="/toUserCenterInfo">· 个人信息</a></li>
            <li><a href="/toUserCenterOrder?currentPage=1&pageSize=4">· 全部订单</a></li>
            <li><a href="/toUserCenterSite" class="active">· 收货地址</a></li>
        </ul>
    </div>
    <div class="right_content clearfix">
        <h3 class="common_title2">地址管理<a href="/toUserCenterSite"><button style="float: right" class="btnTest">↜</button></a></h3>
        <div class="site_con" style="padding: 0px" th:each="address,index:${addresses}">
            <div style="margin: 0px">
                <dl>
                    <dt>
                        <form action="/address/updateAdmin">
                            <input type="hidden" name="id" th:value="${address.id}">
                            <a th:text="${index.index+1}"></a>.收货人：<input type="text" placeholder="请输入您的姓名" name="userName" th:value="${address.userName}">
                            <a>联系方式：</a><input type="text" placeholder="请输入您的联系方式" name="phone" th:value="${address.phone}">
                            <a>联系地址：</a><input type="text" placeholder="请输入您的联系地址" name="address" th:value="${address.address}">
                            <a><a th:href="@{/address/deleteAdmin(id=${address.id})}"><button type="button" class="bbbb">删除</button></a>丨
                                <a><button type="submit" class="bbbb">修改</button></a></a>
                        </form>
                    </dt>
                </dl>
            </div>
        </div>
    </div>
</div>



<div class="footer">
    <div class="foot_link">
        <a href="#">关于我们</a>
        <span>|</span>
        <a href="#">联系我们</a>
        <span>|</span>
        <a href="#">招聘人才</a>
        <span>|</span>
        <a href="#">友情链接</a>
    </div>
    <p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
    <p>电话：010-****888    京ICP备*******8号</p>
</div>

</body>
</html>